home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmTaskbar
- Caption = "You shouldn't see this form."
- ClientHeight = 1530
- ClientLeft = 1560
- ClientTop = 2040
- ClientWidth = 2835
- Height = 2160
- Left = 1530
- LinkTopic = "Form1"
- ScaleHeight = 1530
- ScaleWidth = 2835
- Top = 1440
- Width = 2895
- Begin MessageBlaster.MsgBlaster msgbMain
- Left = 360
- Top = 240
- _version = 65536
- _extentx = 847
- _extenty = 847
- _stockprops = 0
- enabled = -1 'True
- voodoo = "taskbar.frx":0000
- End
- Begin VB.Menu mnuHolder
- Caption = "mnuHolder"
- Begin VB.Menu mnuHolderAbout
- Caption = "&About..."
- End
- Begin VB.Menu mnuHolderSep1
- Caption = "-"
- End
- Begin VB.Menu mnuHolderClose
- Caption = "&Close"
- End
- End
- Attribute VB_Name = "frmTaskbar"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub Form_Load()
- On Error Resume Next
- 'set message receiving target to desired form handle
- msgbMain.hWndTarget = Me.hwnd
- 'add application defined message to MessageBlaster "watch" list
- msgbMain.AddMessage WM_USER, POSTPROCESS
- 'add icon to Win95 taskbar
- AddIcon Me, WM_USER, "Message Blaster/Taskbar Icon Sample by Cris Williams"
- End Sub
- Private Sub mnuHolderAbout_Click()
- On Error Resume Next
- 'show about box
- frmAbout.Show vbModal
- End Sub
- Private Sub mnuHolderClose_Click()
- On Error Resume Next
- 'remove icon from Win95 taskbar
- DelIcon
- 'send message to designated form to shutdown
- SendMessage hwnd, WM_USER, 0, WM_USER + 1
- End Sub
- Private Sub msgbMain_Message(ByVal hwnd As Long, ByVal Msg As Long, wParam As Long, lParam As Long, nPassage As Integer, lReturnValue As Long)
- On Error Resume Next
- 'evaluate lParam argument of received message
- Select Case lParam
- 'if left button is clicked on taskbar icon...
- Case WM_LBUTTONDOWN
-
- 'display informative message
- MsgBox "The left mouse button was clicked.", vbInformation, App.Title
-
- 'if middle or right button is clicked on taskbar icon...
- Case WM_MBUTTONDOWN, WM_RBUTTONDOWN
-
- If IsWindowVisible(frmAbout.hwnd) Then
- MsgBox "Close the About dialog, then continue.", vbExclamation, App.Title
- Exit Sub
- End If
- 'display popup menu at mousepointer
- popupmenu mnuHolder, 0, , , mnuHolderClose
-
- 'if application defined message is received
- Case WM_USER + 1
-
- 'shutdown
- End
-
- End Select
- End Sub
- Private Sub msgbMain_Click()
- End Sub
-